package com.cskaoyan.service.impl;

import com.cskaoyan.bean.CskaoyanmallRegion;
import com.cskaoyan.bean.vo.City;
import com.cskaoyan.mapper.CskaoyanmallRegionMapper;
import com.cskaoyan.service.ZbRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ZbRegionServiceImpl implements ZbRegionService {
    @Autowired
    CskaoyanmallRegionMapper regionMapper;

    @Override
    public List<CskaoyanmallRegion> queryRegionByPid(Integer pid) {
        List<CskaoyanmallRegion> regions = regionMapper.selectRegionByPid(pid);
        return regions;
    }

    @Override
    public String queryProvinceById(Integer provinceId) {
        String Province = regionMapper.selectProvinceById(provinceId);
        return Province;
    }

    @Override
    public String queryCityById(Integer cityId) {
        String city = regionMapper.selectCityByCityId(cityId);
        return city;
    }

    @Override
    public String queryAreaById(Integer areaId) {
        String area = regionMapper.selectAreaById(areaId);
        return area;
    }
}
